<?php

namespace App\Models;

use Framework\BaseModel;

/**
 * App\Models\_EmptyModel
 *
 * @method static \Illuminate\Database\Eloquent\Builder|_EmptyModel newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|_EmptyModel newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|_EmptyModel query()
 * @mixin \Eloquent
 * @property-read mixed $img_url
 * @property int $id
 * @property int $type 类型1=首页2=学堂3=金刚区4其他
 * @property int $status 状态0下线1上线
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|BannerModel whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BannerModel whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BannerModel whereImgUrl($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BannerModel whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BannerModel whereType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|BannerModel whereUpdatedAt($value)
 */
class BannerModel extends BaseModel
{
    protected $table = 'banner';


    public function getImgUrlAttribute($value)
    {
        return json_decode($value,true);
    }
}
